package com.feeyo.prophet.pojo.enums;

/**
 * rcdi 数据类型
 */
public enum CategoryTypeEnum {
    BASIC("basic", "基础常识"),
    RCDI("rcdi", "知识问答"),
    FLIGTH("flight", "航班信息"),
    FINANCE("finance", "财报"),
    FLEET("fleet", "机队"),
    RANK("rank", "排名"),
    RAG("rag", "网页爬虫"),
    OTHER("other", "其他问题"),
    ;
    public final String code;
    public final String desc;

    CategoryTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }


    public static CategoryTypeEnum getTypeEnum(String code) {
        for (CategoryTypeEnum type : CategoryTypeEnum.values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
}
